//this file is for things related to the data that makes up the map only, i.e. things that would be saved in
	//the saved map file.
//variables used for other parts of the app should go in their respective files

//getters and setters
Node.prototype.__defineGetter__("id", function () {
        return this.displayedDiv.id;
});

Node.prototype.__defineSetter__("id", function (x) {
        this.displayedDiv.id = x;
});

Node.prototype.__defineGetter__("text", function () {
        return this.editField.innerText;
});

Node.prototype.__defineSetter__("text", function (x) {
        this.editField.innerText = x;
});

Node.prototype.__defineGetter__("timestamp", function () {
        if (!("_timestamp" in this))
            this._timestamp = 0;
        return this._timestamp;
});

Node.prototype.__defineSetter__("timestamp", function (x) {
        if (this._timestamp == x)
            return;

        this._timestamp = x;
        var date = new Date();
        date.setTime(parseFloat(x));
        this.lastModified.textContent = modifiedString(date);
});

Node.prototype.__defineGetter__("left", function () {
        return this.displayedDiv.offsetLeft;
});

Node.prototype.__defineSetter__("left", function (x) {
        this.displayedDiv.style.left = x + "px";
});

Node.prototype.__defineGetter__("top", function () {
        return this.displayedDiv.offsetTop;
});

Node.prototype.__defineSetter__("top", function (x) {
        this.displayedDiv.style.top = x + "px";
});

Node.prototype.__defineGetter__("nextSibling", function(){
	return this.parent.children[(this.indexToParent + 1)];
});

Node.prototype.__defineGetter__("previousSibling", function(){
	return this.parent.children[(this.indexToParent - 1)];
});
